package cn.k7g.virtual;


import cn.k7g.codeflow.annotation.NodeFlag;
import cn.k7g.codeflow.annotation.OutPort;
import cn.k7g.codeflow.common.AjaxResult;
import cn.k7g.codeflow.invoke.CodeFlow;
import cn.k7g.codeflow.invoke.CodeInvoke;
import cn.k7g.codeflow.model.node.CodeNodeClass;
import cn.k7g.codeflow.service.CodeNodeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("user")
public class UserController implements CodeNodeClass {


    @NodeFlag(
            label = "用户接口请求",
            outPorts = {
                    @OutPort(name=CodeFlow.NAME_SUCCESS, type = User.class, remark = "查询用户列表"),
                    @OutPort(name=CodeFlow.NAME_ERROR, type = User.class, remark = "没有用户信息"),
                    @OutPort(name="export", type = User.class, remark = "导出用户信息")
            }
    )
    @GetMapping
    public AjaxResult listNodes(CodeFlow flow, CodeInvoke invoke) {
        flow.out("", "");
        return AjaxResult.success();
    }
}
